import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/meetingreservation/` + url, ...arg)

/**
 * 会议室预约Api接口管理器
 *
 * @author 沐雨眠竹
 * @date  2025/05/15 10:05
 **/
export default {
	// 获取会议室预约分页
	meetingReservationPage(data) {
		return request('page', data, 'get')
	},
	// 提交会议室预约表单 edit为true时为编辑，默认为新增
	meetingReservationSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除会议室预约
	meetingReservationDelete(data) {
		return request('delete', data)
	},
	// 获取会议室预约详情
	meetingReservationDetail(data) {
		return request('detail', data, 'get')
	},
	//获取指定日期、时间段和会议室类型下已预约的会议室
	getReservedMeeting(data) {
		return request('getReservedMeeting', 'get')
	},
	// 取消设备预约
	cancel(data) {
		return request('cancel', data, 'post')
	}
}
